#include "structure.h"
//#include "IFDInterface.h"
//#include "IFD.h"

using namespace HWM;

//UIDisplay

#define _cOFFSET(x,y)			((x) + (y) * UI_WIDTH)
#define _cOFFSETP(k)			((((_position)k).x) + (((_position)k).y) * UI_WIDTH)

#define __RGB				unsigned int
#define ___RGB(x,y,z)			(((x) & LOWB(8)) << 24 | ((y) & LOWB(8)) << 16 | ((z) &  << 8)
#define ___REVERSE_RGB(x)		((0xFFFFFFFF - (x)) & HIGHB(24))
#define UI_SIZE				(UI_WIDTH * UI_HEIGHT)	


#define __USIZE(x,y)		((_usize){((unsigned short)(x)),((unsigned short)(y))})
#define __POISITION(x,y)	((_position){((unsigned short)(x)),((unsigned short)(y))})

namespace PAL
{

unsigned int* UI_FROM;
unsigned int UI_WIDTH;
unsigned int UI_HEIGHT;

typedef struct __UIOUTPUT_
{
	hwdd* display;
	_usize size;
	
}_ui;

typedef struct __COORDINATE_
{	
	unsigned short x;
	unsigned short y;
}_position;

typedef struct __UISIZE_
{
	unsigned short width;
	unsigned short height;
}_usize;

}
